using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace MusicEvolution.Database
{
    public class Share : DataBaseRow
	{
        DataField _Name;
        DataField _path;
        DataField _LastScanned;
        DataField _ScanAutomaticaly;

        public Share()
        {
            _Name = new DataField("Name", "");
            _path = new DataField("Path", "");
            _LastScanned = new DataField("LastScanned", "");
            _ScanAutomaticaly = new DataField("ScanAutomatically", "");
        }

        public string Name
        {
            get { return _Name.Value; }
            set { _Name.Value = value; }
        }

        public string Path
        {
            get { return _path.Value; }
            set { _path.Value = value; }
        }

        public DateTime LastScanned
        {
            get { return DateTime.FromFileTime(Convert.ToInt64(_LastScanned.Value)); }
            set { _LastScanned.Value = value.ToFileTime().ToString(); }
        }

        public bool ScanAutomatically
        {
            get { return Convert.ToBoolean(_ScanAutomaticaly.Value); }
            set { _ScanAutomaticaly.Value = Convert.ToInt32(value).ToString(); }
        }
	}
}
